import {
	createSSRApp
} from "vue";

import App from "./App.vue";

// 引入uv-ui
import uvUI from '@climblee/uv-ui';

// 引入自定义工具函数
import tools from "./tools/tools";

// 引入封装请求服务
import request from "./services/request";

export function createApp() {
	const app = createSSRApp(App);


	// app use是使用插件的 

	/* 
	如果你想让它支持 app.use(request)，就需要全局挂载：
	// services/request.js
	export default {	
		install(app) {
			app.config.globalProperties.$request = xxxx;
			}
		}
	*/
	app.use(uvUI);
	app.use(tools);

    request(app); 	

	return {
		app,
	};
}
